<?php
/* @var $this LocalidadController */
/* @var $model Localidad */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'localidad-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Los campos con <span class="required">*</span> son requeridos.</p>

	<?php echo $form->errorSummary($model); ?>
	<div class="span-15">
		<div class="span-8">
			<?php echo $form->labelEx($model,'nombre'); ?>
			<?php echo $form->textField($model,'nombre',array('size'=>45,'maxlength'=>45)); ?>
			<?php echo $form->error($model,'nombre'); ?>
		</div>
	</div>
	<div class="span-15">
			<div class="span-4">
				<?php echo $form->labelEx($model,'codigo_postal'); ?>
				<?php echo $form->textField($model,'codigo_postal'); ?>
				<?php echo $form->error($model,'codigo_postal'); ?>
			</div>
	</div>
	<div class="span-15">
		<div class="span-7">
			<?php echo $form->labelEx($model,'provincia'); ?>
			<?php echo $form->dropDownList($model,'provincia',CHtml::listData(Provincia::model()->findAll(),'idprovincia','nombre'),array('empty'=>'Seleccione la provincia...',)); ?>
			<?php echo $form->error($model,'provincia'); ?>
		</div>
		
	</div>
	<div class="span-15">
		<div class="span-4">
			<?php echo CHtml::submitButton($model->isNewRecord ? 'Crear' : 'Guardar'); ?>
		</div>
	
	</div>





<?php $this->endWidget(); ?>

</div><!-- form -->